#include "sdkGlobal.h"
#include "platform_global.h"
#include "platform_refund.h"


typedef struct
{
    TransmitRefundOnlineFunc mTransmitOnlineFunc;
    TransShowPlatformFunc mTransShowFunc;
    RecordPlatformFunc mRecordPlatformFunc;
    TransmitDataPlatformFunc mTransmitDataPlatformFunc;
    InputAdminPasswordFunc mInputAdminPasswordFunc;
    InputSysRefNoFunc mInputSysRefNoFunc;
    InputOriginalTradeDateFunc mInputOriginalTradeDateFunc;
} platform_refund_entity;

static platform_refund_entity g_platform_refund_entity;

void platform_refund_init()
{
    memset(&g_platform_refund_entity, 0x00, sizeof(g_platform_refund_entity));
}

void platform_refund_set_transmit_online_func(TransmitRefundOnlineFunc func)
{
    g_platform_refund_entity.mTransmitOnlineFunc = func;
}

TransmitRefundOnlineFunc platform_refund_get_transmit_online_func()
{
    return g_platform_refund_entity.mTransmitOnlineFunc;
}

void platform_refund_set_input_sysrefno_flow_func(InputSysRefNoFunc func)
{
    g_platform_refund_entity.mInputSysRefNoFunc = func;
}

InputSysRefNoFunc platform_refund_get_input_sysrefno_flow_func()
{
    return g_platform_refund_entity.mInputSysRefNoFunc;
}

void platform_refund_set_show_func(TransShowPlatformFunc *flowFunc)
{
    memcpy(&g_platform_refund_entity.mTransShowFunc, flowFunc, sizeof(TransShowPlatformFunc));
}

TransShowPlatformFunc *platform_refund_get_show_func()
{
    return &g_platform_refund_entity.mTransShowFunc;
}

void platform_refund_set_transmit_data_func(TransmitDataPlatformFunc *platformFunc)
{
    memcpy(&g_platform_refund_entity.mTransmitDataPlatformFunc, platformFunc, sizeof(TransmitDataPlatformFunc));
}

TransmitDataPlatformFunc *platform_refund_get_transmit_data_func()
{
    return &g_platform_refund_entity.mTransmitDataPlatformFunc;
}

void platform_refund_set_record_func(RecordPlatformFunc *platformFunc)
{
    memcpy(&g_platform_refund_entity.mRecordPlatformFunc, platformFunc, sizeof(RecordPlatformFunc));
}

RecordPlatformFunc *platform_refund_get_record_func()
{
    return &g_platform_refund_entity.mRecordPlatformFunc;
}

void platform_refund_set_input_admin_password_flow_func(InputAdminPasswordFunc platformFunc)
{
    g_platform_refund_entity.mInputAdminPasswordFunc = platformFunc;
}

InputAdminPasswordFunc platform_refund_get_input_admin_password_flow_func()
{
    return g_platform_refund_entity.mInputAdminPasswordFunc;
}

void platform_refund_set_input_original_trade_date_flow_func(InputOriginalTradeDateFunc platformFunc)
{
    g_platform_refund_entity.mInputOriginalTradeDateFunc = platformFunc;
}

InputOriginalTradeDateFunc platform_refund_get_input_original_trade_date_flow_func()
{
    return g_platform_refund_entity.mInputOriginalTradeDateFunc;
}